<%@ Page Language="VB" MasterPageFile="~/site.master" AutoEventWireup="false" codefile="FanClubPictures.aspx.vb" Inherits="FanClubPictures" %>
<%@ Register TagPrefix="wu" TagName="PictureUpload" Src="../PictureUpload.ascx" %>
<%@ Register TagPrefix="wu" TagName="FixtureList" Src="../FixtureList.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="server">

    <wu:FixtureList ID="FixtureList1" Runat="server" />

    <asp:panel id="UploadPanel" runat="server">
        <wu:PictureUpload id=PictureUpload1 runat="server" UploadImageType="Match"
            OnFileUploaded="PictureUploaded"></wu:PictureUpload>
        <br />
        <asp:textbox id="txtNotes" runat="server" Columns="43" TextMode="MultiLine" Rows="2"></asp:textbox>
        <asp:Label ID="Status" Runat="server"></asp:Label></asp:panel>
    
    <asp:sqldatasource id="SqlDataSource1" runat="server"
        selectcommand="SELECT [Notes], [PictureURL] FROM [Gallery] WHERE ([FixtureID] = @FixtureID AND UploadedByMemberName = @MemberName)"
        connectionstring="<%$ ConnectionStrings:WroxUnited %>">
        <SelectParameters>
            <asp:ControlParameter Name="FixtureID" Type="Int32" ControlID="FixtureList1" PropertyName="SelectedValue"></asp:ControlParameter>
            <asp:ProfileParameter Type="string" Name="MemberName" PropertyName="MemberName"></asp:ProfileParameter>
        </SelectParameters>
    </asp:sqldatasource>
    
    <asp:datalist id="DataList1" runat="server" datasourceid="SqlDataSource1"
        repeatcolumns="4">
        <ItemTemplate>
            <asp:image id="PictureImage" runat="server" ImageUrl='<%# Eval("PictureURL", "~/MatchImages/{0}") %>'></asp:image>
            <asp:Label id="NotesLabel" runat="server" Text='<%# Eval("Notes") %>'></asp:Label>
        </ItemTemplate>

        <ItemStyle VerticalAlign="Top"></ItemStyle>
    </asp:datalist>
    
</asp:Content>
